# coding:utf8
import requests

class HtmlDownloader(object):
	def __init__(self, headers, cookies):
		self.headers = headers
		self.cookies = cookies

	def download(self, url):
		if url is None:
			return None
		try:
			respnese = requests.get(url, headers = self.headers, cookies = self.cookies, timeout = 10)
			return respnese.text
		except Exception as e:
			print(e)
		
		

	# def ajax_text(self):
	# 	respnese = requests.get("https://www.busdmm.us/ajax/uncledatoolsbyajax.php?gid=39432208926&lang=zh&img=https://pics.javcdn.pw/cover/6ywp_b.jpg&uc=0&floor=302",  headers = self.headers, timeout = 10)
	# 	print(respnese.text)